// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';

import {
	Row,
	Col,
	Tooltip,
	Switch,
	Button,
	Table,
	TableColumn,
	Breadcrumb,
	BreadcrumbItem,
	Dialog,
	Pagination,
	Input
} from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

// import MintUI from 'mint-ui'
// import 'mint-ui/lib/style.css'

import Echarts from 'echarts';
import Echarts_better from 'echarts-better'

import App from './App';

import router from './router/routes.js';

import api from './api/index.js';
import util from './utils/common.js';

import "babel-polyfill";

import promise from 'es6-promise';

import 'element-ui/lib/theme-chalk/display.css';

import Vuex from 'vuex'
Vue.use(Vuex)


promise.polyfill(); 

// 将API方法绑定到全局
Vue.prototype.$api = api;
Vue.prototype.$util = util;

Vue.config.productionTip = false;

Vue.use(Row);
Vue.use(Col);
Vue.use(Tooltip);
Vue.use(Switch);
Vue.use(Button);
Vue.use(Table);
Vue.use(TableColumn);
Vue.use(Breadcrumb);
Vue.use(BreadcrumbItem);
Vue.use(Dialog);
Vue.use(Pagination);
Vue.use(Input);
Vue.use(Dialog);

// Vue.use(MintUI);
window.eventBus = new Vue();

Vue.directive('title', {
  inserted: function (el, binding) {
    document.title = el.dataset.title;
  }
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})

